<template>
	<view>
		<navBar title="我的关注" ></navBar>
		<view class="content">
			<view class="content-item" v-for="(item,index) in LikeUserList" :key="item.id">
				<view class="content-item-left">
					<image :src="item.user.avatar" mode=""></image>
				</view>
				
				<view class="content-item-right">
					<h1>{{item.user.name}}</h1>
					<text>{{item.user.desc}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex'
	export default {
		data() {
			return {
				LikeUserList:[]
			}
		},
		onLoad() {
			uni.request({
				url: 'https://eggblog.bluej.cn/api/user/getLikeUser', //获取关注作者
				header: {
					"x-token": this.userInfo.token //自定义请求头信息
				},
				success: (res) => {
					console.log(res);
					this.LikeUserList = res.data.data.rows
				}
			})
		},
		methods: {
			
		},
		computed: {
			...mapState(['userInfo'])
		},
	}
</script>

<style lang="scss">
.content{
	padding: 15px;
	box-sizing: border-box;
	
	.content-item{
		padding: 15px;
		box-sizing: border-box;
		display: flex;
		justify-content: space-between;
		background-color: #fff;
		border-radius: 6px;
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
margin-bottom: 30px;
		.content-item-left{
			width: 80px;
			height: 80px;
			image{
				width: 80px;
				height: 80px;
			}
		}
		
		.content-item-right{
			display: flex;
			flex-direction: column;
			height: 80px;
			width: 52vw;
			justify-content: space-around;
			h1{
				font-size: 16px;
			}
			
			text{
				font-size: 14px;
				color: #c6c6c6;
			}
		}
	}
}
</style>
